@extends('admin::layouts.master')
@section('content-header')
	
	<h1>
		所有产品({!! $goods->count() !!})
		&middot;
		<small>{!! link_to_route('admin.goods.create', '添加') !!}</small>
	</h1>
@stop
@section('content')

   <table class="table">
		<thead>
                        <th>图片</th>
			<th>型号</th>
			<th>产品名称</th>
			<th>单价</th>
			<th class="text-center">操作</th>
		</thead>
                <tbody>
                    @foreach ($goods as $g)
                    <tr>
                        <td><img src="{!! thumber(60,$g->image) !!}" /></td>
                        <td>{!! $g->codeno !!}</td>
                        <td>{!! $g->name !!}</td>
                        <td>{!! $g->price !!}</td>
                        <td class="text-center">
                            <a href="{!! route('admin.goods.edit', $g->id) !!}">编辑</a>
                            &middot;
                            @include('admin.common.modal', ['data' => $g, 'name' => 'goods','what'=>'产品'])
                        </td>
                    </tr>
                    @endforeach
                </tbody>
</table>
<div class="text-center">
	{!! $goods->render() !!}
</div>

@stop